-- GENERATED SPELL FOR [Death's Head Sage] --


function spell0_4518(pUnit, Event) --@Elemental Protection Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(8262,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_4518', 1, 1)
end

function spell1_4518(pUnit, Event) --@Healing Ward,Self--
pUnit:FullCastSpellOnTarget(4971,pUnit)
pUnit:RegisterEvent('Sorts_4518', 32000, 1)
end

function Sorts_4518(pUnit, Event)
local choix_sorts_4518 = math.random(0, 1)
if choix_sorts_4518 == 0 then
pUnit:RegisterEvent('spell0_4518', 1, 1)
end
if choix_sorts_4518 == 1 then
pUnit:RegisterEvent('spell1_4518', 1, 1)
end
end

function mob4518_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4518', math.random(1500, 3000), 1)
end

function mob4518_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4518_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4518_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4518, 1, 'mob4518_Action')
RegisterUnitEvent(4518, 2, 'mob4518_Leave')
RegisterUnitEvent(4518, 3, 'mob4518_Kill')
RegisterUnitEvent(4518, 4, 'mob4518_Die')
